//test for whoseTurn()

#include "dominion.h"
#include "dominion_helpers.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "rngs.h"

#define DEBUG 0
#define NOISY_TEST 1

int main () {

  int r;
  int player;
  int k[10] = {adventurer, council_room, feast, gardens, mine,
	       remodel, smithy, village, baron, great_hall};

  struct gameState G;
  
  puts("\n\n********* UNIT TEST 3 -WHOSETURN ************\n");
  r = initializeGame(2, k, 1, &G);

  printf ("initializeGame(2, k, 1, &G) = %d\n", r);
  assert(r == 0);

  //check for first player
  player = whoseTurn(&G);

  printf("player %d goes first\n", player);
  assert(player == 0);

  endTurn(&G); 

  player = whoseTurn(&G);
  printf("next player is %d \n", player);
  assert(player == 1);

  endTurn(&G); 

  player = whoseTurn(&G);
  printf("next player is %d \n", player);
  assert(player == 0);

  printf("testWhoseTurn: PASS \n");


  
  return 0;
}
